﻿
using Admin.NET.Application.Entity;
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 网关信息基础输入参数
    /// </summary>
    public class DeviceGateWayBaseInput
    {
        /// <summary>
        /// 设备编号
        /// </summary>
        public virtual string DeviceNo { get; set; }
        
        /// <summary>
        /// 机构Id
        /// </summary>
        public virtual long OrgId { get; set; }
        
        /// <summary>
        /// 网关名称
        /// </summary>
        public virtual string GateWayName { get; set; }
        
        /// <summary>
        /// 设备地址
        /// </summary>
        public virtual string DeviceAddress { get; set; }
        
        /// <summary>
        /// 设备位置
        /// </summary>
        public virtual string DevicePosition { get; set; }
        
        /// <summary>
        /// 设备位置类型
        /// </summary>
        public virtual DevicePositionType DevicePositionType { get; set; }
        
        /// <summary>
        /// 序列号
        /// </summary>
        public virtual string Sn { get; set; }
        
        /// <summary>
        /// 启用状态
        /// </summary>
        public virtual DeviceEnableStatus DeviceEnableStatus { get; set; }
        
        /// <summary>
        /// 设备排序
        /// </summary>
        public virtual int DeviceWeight { get; set; }
        
        /// <summary>
        /// 功能监控
        /// </summary>
        public virtual bool DeviceFuncMonitor { get; set; }
        
        /// <summary>
        /// 云网穿透
        /// </summary>
        public virtual bool DeviceFuncCloud { get; set; }
        
        /// <summary>
        /// 激活状态
        /// </summary>
        public virtual Active Active { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 网关信息分页查询输入参数
    /// </summary>
    public class PageDeviceGateWayInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 机构Id
        /// </summary>
        public long? OrgId { get; set; }
        
        /// <summary>
        /// 网关名称
        /// </summary>
        public string? GateWayName { get; set; }
        
        /// <summary>
        /// 序列号
        /// </summary>
        public string? Sn { get; set; }
        
    }

    /// <summary>
    /// 网关信息增加输入参数
    /// </summary>
    public class AddDeviceGateWayInput : DeviceGateWayBaseInput
    {
        /// <summary>
        /// 设备编号
        /// </summary>
        [Required(ErrorMessage = "设备编号不能为空")]
        public override string DeviceNo { get; set; }
        
        /// <summary>
        /// 机构Id
        /// </summary>
        [Required(ErrorMessage = "机构Id不能为空")]
        public override long OrgId { get; set; }
        
        /// <summary>
        /// 网关名称
        /// </summary>
        [Required(ErrorMessage = "网关名称不能为空")]
        public override string GateWayName { get; set; }
        
        /// <summary>
        /// 设备地址
        /// </summary>
        [Required(ErrorMessage = "设备地址不能为空")]
        public override string DeviceAddress { get; set; }
        
        /// <summary>
        /// 设备位置
        /// </summary>
        [Required(ErrorMessage = "设备位置不能为空")]
        public override string DevicePosition { get; set; }
        
        /// <summary>
        /// 设备位置类型
        /// </summary>
        [Required(ErrorMessage = "设备位置类型不能为空")]
        public override DevicePositionType DevicePositionType { get; set; }
        
        /// <summary>
        /// 序列号
        /// </summary>
        [Required(ErrorMessage = "序列号不能为空")]
        public override string Sn { get; set; }
        
        /// <summary>
        /// 启用状态
        /// </summary>
        [Required(ErrorMessage = "启用状态不能为空")]
        public override DeviceEnableStatus DeviceEnableStatus { get; set; }
        
        /// <summary>
        /// 设备排序
        /// </summary>
        [Required(ErrorMessage = "设备排序不能为空")]
        public override int DeviceWeight { get; set; }
        
        /// <summary>
        /// 云网穿透
        /// </summary>
        [Required(ErrorMessage = "云网穿透不能为空")]
        public override bool DeviceFuncCloud { get; set; }
        
        /// <summary>
        /// 激活状态
        /// </summary>
        [Required(ErrorMessage = "激活状态不能为空")]
        public override Active Active { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 网关信息删除输入参数
    /// </summary>
    public class DeleteDeviceGateWayInput : BaseIdInput
    {
    }

    /// <summary>
    /// 网关信息更新输入参数
    /// </summary>
    public class UpdateDeviceGateWayInput : DeviceGateWayBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 网关信息主键查询输入参数
    /// </summary>
    public class QueryByIdDeviceGateWayInput : DeleteDeviceGateWayInput
    {

    }
